package com.easyattendance.model;

import java.io.Serializable;
import java.util.Date;

public class StudentLeavePK implements Serializable{
	
	private int stud_roll_no;
	private String class_id;
	private Date leave_start_date;
	
	
	public StudentLeavePK()
	{
		
	}
	
	
	public StudentLeavePK(int stud_roll_no, String class_id, Date leave_start_date) {
		super();
		this.stud_roll_no = stud_roll_no;
		this.class_id = class_id;
		this.leave_start_date = leave_start_date;
	}


	public int getStud_roll_no() {
		return stud_roll_no;
	}


	public void setStud_roll_no(int stud_roll_no) {
		this.stud_roll_no = stud_roll_no;
	}


	public Date getLeave_start_date() {
		return leave_start_date;
	}


	public void setLeave_start_date(Date leave_start_date) {
		this.leave_start_date = leave_start_date;
	}


	public String getClass_id() {
		return class_id;
	}

	public void setClass_id(String class_id) {
		this.class_id = class_id;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((class_id == null) ? 0 : class_id.hashCode());
		result = prime
				* result
				+ ((leave_start_date == null) ? 0 : leave_start_date.hashCode());
		result = prime * result + stud_roll_no;
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		StudentLeavePK other = (StudentLeavePK) obj;
		if (class_id == null) {
			if (other.class_id != null)
				return false;
		} else if (!class_id.equals(other.class_id))
			return false;
		if (leave_start_date == null) {
			if (other.leave_start_date != null)
				return false;
		} else if (!leave_start_date.equals(other.leave_start_date))
			return false;
		if (stud_roll_no != other.stud_roll_no)
			return false;
		return true;
	}
	
	

}
